import { request } from '@/utils/request'

// 查询财务明细列表
export function listFinanceDetail(query) {
  return request({
    url: '/system/financeDetail/list',
    method: 'get',
    params: query
  })
}

// 网单批量结算
export function updateCarOrderFinance(id) {
  return request({
    url: '/system/carOrderFinance/' + id,
    method: 'put'
  })
}

// 查询财务明细详细
export function getFinanceDetail(id) {
  return request({
    url: '/system/financeDetail/' + id,
    method: 'get'
  })
}

// 新增财务明细
export function addFinanceDetail(data) {
  return request({
    url: '/system/financeDetail',
    method: 'post',
    data: data
  })
}

// 修改财务明细
export function updateFinanceDetail(data) {
  return request({
    url: '/system/financeDetail',
    method: 'put',
    data: data
  })
}

// 删除财务明细
export function delFinanceDetail(id) {
  return request({
    url: '/system/financeDetail/' + id,
    method: 'delete'
  })
}

// 生成支付界面
export function payFinanceDetail(ids) {
  return request({
    url: '/system/financeDetail/pay/' + ids,
    method: 'get'
  })
}

// 查询车辆订单财务详情列表
export function listCarOrderFinance(query) {
  return request({
    url: '/system/carOrderFinance/list',
    method: 'get',
    params: query
  })
}